import React, { Component } from 'react'
import { inject, observer } from 'mobx-react/index'
import { address } from '@/Utils/apiConfig'
import PeerList from './PeerList'

@inject('DataApprovalModel')
@observer
class Peer extends Component {
  constructor(props) {
    super(props)
    this.state = {
      url: address.organizationManagement.peerList.format({ id: props.id }),
    }
  }
  render() {
    return (
      <PeerList {...this.props} {...this.state} go={() => this.props.history.push({ pathname: `/dashboard/fabric/organizationInfo/${this.props.id}/createPeer` })} />
    )
  }
}
export default Peer
